import React, {useState} from 'react';
import {Drawer} from "antd";
import {useLocation, useNavigate} from "react-router-dom";
import EditTable from "./EditTable";

const ReportDetailItem = () => {
    const _state = useLocation().state;
    const [open, setOpen] = useState<boolean>(true);
    const navigate = useNavigate();

    const onClose = () => {
        setOpen(false);
        navigate("..", {state: _state});
    };
    return (
        <Drawer
            title={"报销选项"}
            size={"large"}
            open={open}
            onClose={onClose}
            destroyOnClose
            maskClosable={false}
        >
        <EditTable/>
        </Drawer>
    );
};

export default ReportDetailItem;